package com.smart.plugin.mail;

import com.smart.framework.util.CastUtil;
import com.smart.framework.util.FileUtil;
import java.util.Properties;

public interface MailConstant {

    Properties config = FileUtil.loadPropFile("config-mail.properties");

    boolean IS_DEBUG = CastUtil.castBoolean(config.getProperty("mail.is_debug"));

    interface Sender {

        String PROTOCOL = config.getProperty("sender.protocol");
        boolean IS_SSL = CastUtil.castBoolean(config.getProperty("sender.protocol.ssl"));
        String HOST = config.getProperty("sender.protocol.host");
        int PORT = CastUtil.castInt(config.getProperty("sender.protocol.port"));
        String FROM = config.getProperty("sender.from");
        boolean IS_AUTH = CastUtil.castBoolean(config.getProperty("sender.auth"));
        String AUTH_USERNAME = config.getProperty("sender.auth.username");
        String AUTH_PASSWORD = config.getProperty("sender.auth.password");
    }

    interface Fetcher {

        String PROTOCOL = config.getProperty("fetcher.protocol");
        boolean IS_SSL = CastUtil.castBoolean(config.getProperty("fetcher.protocol.ssl"));
        String HOST = config.getProperty("fetcher.protocol.host");
        int PORT = CastUtil.castInt(config.getProperty("fetcher.protocol.port"));
        String FOLDER = config.getProperty("fetcher.folder");
        boolean FOLDER_READONLY = CastUtil.castBoolean(config.getProperty("fetcher.folder.readonly"));
    }
}
